package com.fhz.kotlinmvvm.dao

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import com.fhz.kotlinmvvm.entity.Goods

/**
 * 时间:2023/9/15
 * @author Mr.Feng
 * 简述: TODO
 */
@Dao
interface GoodsDao {

    @Query("SELECT * FROM goods")
    fun getAll(): List<Goods>

//    @Query("SELECT * FROM goods WHERE uid IN (:userIds)")
//    fun loadAllByIds(userIds: IntArray): List<Goods>

//    @Query("SELECT * FROM v WHERE first_name LIKE :first AND " +
//            "last_name LIKE :last LIMIT 1")
//    fun findByName(first: String, last: String): Goods

    @Insert
    fun insertAll(vararg users: Goods)

    @Delete
    fun delete(user: Goods)
}